/**
 * Created by IntelliJ IDEA.
 * User: user
 * Date: 27.06.12
 * Time: 08:42
 * To change this template use File | Settings | File Templates.
 */
package zakladki.AS3 {
import AS3.constants.help.AcHelp;
import AS3.constants.help.ConsumptionHelp;
import AS3.constants.help.EmissionsHelp;
import AS3.constants.help.FoodHelp;
import AS3.constants.help.HouseHelp;
import AS3.constants.help.PrivateTransportHelp;
import AS3.constants.help.PublicTransportHelp;
import AS3.constants.help.WarmWaterHelp;

import mx.controls.TextArea;


public class HelpLabelSetter {

    private var labelsXML:XML;
    private var txtHelpSmall:TextArea;


    public function HelpLabelSetter(labelsXML:XML, txtHelpSmall:TextArea) {
        this.labelsXML = labelsXML;
        this.txtHelpSmall = txtHelpSmall;
    }

    private var helpString:String = new String("");

    public function setLabelValue(st:String):void
    {
        var language:String = FossilLocales.lang;

        //cnvHelpSmall.visible = true;
        helpString = st;
        //***********************************************************************************
        //*									House										*
        //***********************************************************************************
        if(st == HouseHelp.TYPE){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpRodzajBudynku;
        }
        else if(st == HouseHelp.MATERIAL){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpZbudowanyZ;
        }
        else if(st == HouseHelp.INSULATION){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpOcieplenie;
        }
        else if(st == HouseHelp.AREA){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpMetraz;
        }
        else if(st == HouseHelp.PERSON_NUM){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpLiczbaDomownikow;
        }
        else if(st == HouseHelp.HEATING){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpOgrzewanie;
        }
        else if(st == HouseHelp.HEATING_SOURCE){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpZrodloOgrzewania;
        }
        else if(st == HouseHelp.VENTILATION){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpWietrzenie;
        }
        else if(st == HouseHelp.RENEWABLE){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpOdnawialne;
        }
        //***********************************************************************************
        //*									Warm water										*
        //***********************************************************************************
        else if(st == WarmWaterHelp.BATH_VOLUME){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpWannaWoda;
        }
        else if(st == WarmWaterHelp.HEATING_SOURCE){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpZrodloOgrzewWody;
        }
        else if(st == WarmWaterHelp.BATH_NUMBER){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpWanna;
        }
        else if(st == WarmWaterHelp.SHOWER_NUMBER){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpPrysznic;
        }
        else if(st == AcHelp.FREQUENCY){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpKlimKiedy;
        }
        else if(st == AcHelp.DURATION){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpKlimJakDlugo;
        }
        else if(st == AcHelp.TEMP){
            txtHelpSmall.htmlText = labelsXML.Language.(Name==language).hlpKlimTemp;
        }
        //***********************************************************************************
        //*									Private transport								*
        //***********************************************************************************
        else if (st == PrivateTransportHelp.VEHICLE_TYPE) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpRozmiarPojazdu;
        }
        else if (st == PrivateTransportHelp.VEHICLE_AGE) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpWiek;
        }
        else if (st == PrivateTransportHelp.FUEL_TYPE) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpRodzajPaliwa;
        }
        else if (st == PrivateTransportHelp.FUEL_CONSUMPTION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpZuzyciePaliwa;
        }
        else if (st == PrivateTransportHelp.WEEK_DISTANCE) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpOdlegloscKmTydzien;
        }
        else if (st == PrivateTransportHelp.PASSENGER_FREQ) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpCzestoscJazdyZDrugaOsoba;
        }
        else if (st == PrivateTransportHelp.AC_ENABLED) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpKlima;
        }

        //***********************************************************************************
        //*									Public Transport								*
        //***********************************************************************************

        else if (st == PublicTransportHelp.CITY_BUS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpAutobusMiejski;
        }
        else if (st == PublicTransportHelp.LONG_DISTANCE_BUS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpAutobusDalekobiezny;
        }
        else if (st == PublicTransportHelp.MINI_BUS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpMikrobus;
        }
        else if (st == PublicTransportHelp.TRAM_SUBWAY) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpTramwajMetro;
        }
        else if (st == PublicTransportHelp.TAXI) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpTaxi;
        }
        else if (st == PublicTransportHelp.LONG_DISTANCE_TRAIN) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpPociagDalekobiezny;
        }
        else if (st == PublicTransportHelp.SUBURBAN_TRAIN) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpPociagPodmiejski;
        }
        else if (st == PublicTransportHelp.FLIGHT_CLASS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpKlasa;
        }
        else if (st == PublicTransportHelp.SHORT_DISTANCE_FLIGHTS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpLotyKrotkodystansowe;
        }
        else if (st == PublicTransportHelp.SHORT_DISTANCE_FLIGHTS) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpLotyDlugodystansowe;
        }

        //***********************************************************************************
        //*									Food										*
        //***********************************************************************************
        else if (st == FoodHelp.AMOUNT) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpIloscJedzenia;
        }
        else if (st == FoodHelp.ORIGIN) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpPochodzenieProduktow;
        }
        else if (st == FoodHelp.MEAT_CONSUMPTION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpCzestotliwoscJedzeniaMiesa;
        }
        else if (st == FoodHelp.FROZEN_FOOD) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpZywnoscMrozona;
        }
        else if (st == FoodHelp.FRIDGE) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpLodowka;
        }
        else if (st == FoodHelp.COOKER) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpKuchenka;
        }
        //***********************************************************************************
        //*									Konsumption										*
        //***********************************************************************************
        else if (st == ConsumptionHelp.INCOME) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpDochod;
        }
        else if (st == ConsumptionHelp.RECYCLING) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpRecykling;
        }
        else if (st == ConsumptionHelp.CLOTHES) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpUbrania;
        }
        else if (st == ConsumptionHelp.PACKAGING) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpOpakowania;
        }
        else if (st == ConsumptionHelp.FURNITURE_ELECTRONIC) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpMebleIElektronika;
        }
        else if (st == ConsumptionHelp.RECREATION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpRekreacja;
        }
        else if (st == ConsumptionHelp.ELECTRICITY) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpElektrycznosc;
        }
        else if (st == ConsumptionHelp.RENEWABLE_RATIO) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpPEnergiZeZrodelOdnawialnych;
        }
        else if (st == ConsumptionHelp.AGD_EQUIPMENT) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpSprzetAGD;
        }
        //***********************************************************************************
        //*									Your emission										*
        //***********************************************************************************
        else if (st == EmissionsHelp.ENERGY_PRODUCTION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpProdukcjaEnergii;
        }
        else if (st == EmissionsHelp.INDUSTRIAL_REDUCTION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpPoprawaEfektywnosciPrzemyslowej;
        }
        else if (st == EmissionsHelp.TRANSPORT_REDUCTION) {
            txtHelpSmall.htmlText = labelsXML.Language.(Name == language).hlpRedukcjaEmisjiZTransportuDrogowego;
        }

        else {
            txtHelpSmall.htmlText = '<b>Brak pomocy dla danej opcji</b>';
        }


    }

}
}
